package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AdminLuckyCommandMapper;
import com.ruoyi.system.domain.AdminLuckyCommand;
import com.ruoyi.system.service.IAdminLuckyCommandService;

/**
 * 玩法管理Service业务层处理
 *
 * @author ruoyi
 * @date 2021-06-03
 */
@Service
public class AdminLuckyCommandServiceImpl implements IAdminLuckyCommandService
{
    @Autowired
    private AdminLuckyCommandMapper adminLuckyCommandMapper;

    /**
     * 查询玩法管理
     *
     * @param id 玩法管理ID
     * @return 玩法管理
     */
    @Override
    public AdminLuckyCommand selectAdminLuckyCommandById(Long id)
    {
        return adminLuckyCommandMapper.selectAdminLuckyCommandById(id);
    }

    @Override
    public AdminLuckyCommand selectAdminLuckyCommandByCommand(String command) {
        return adminLuckyCommandMapper.selectAdminLuckyCommandByCommand(command);
    }

    /**
     * 查询玩法管理列表
     *
     * @param adminLuckyCommand 玩法管理
     * @return 玩法管理
     */
    @Override
    public List<AdminLuckyCommand> selectAdminLuckyCommandList(AdminLuckyCommand adminLuckyCommand)
    {
        return adminLuckyCommandMapper.selectAdminLuckyCommandList(adminLuckyCommand);
    }

    /**
     * 新增玩法管理
     *
     * @param adminLuckyCommand 玩法管理
     * @return 结果
     */
    @Override
    public int insertAdminLuckyCommand(AdminLuckyCommand adminLuckyCommand)
    {
        adminLuckyCommand.setCreateTime(DateUtils.getNowDate());
        return adminLuckyCommandMapper.insertAdminLuckyCommand(adminLuckyCommand);
    }

    /**
     * 修改玩法管理
     *
     * @param adminLuckyCommand 玩法管理
     * @return 结果
     */
    @Override
    public int updateAdminLuckyCommand(AdminLuckyCommand adminLuckyCommand)
    {
        adminLuckyCommand.setUpdateTime(DateUtils.getNowDate());
        return adminLuckyCommandMapper.updateAdminLuckyCommand(adminLuckyCommand);
    }

    /**
     * 批量删除玩法管理
     *
     * @param ids 需要删除的玩法管理ID
     * @return 结果
     */
    @Override
    public int deleteAdminLuckyCommandByIds(Long[] ids)
    {
        return adminLuckyCommandMapper.deleteAdminLuckyCommandByIds(ids);
    }

    /**
     * 删除玩法管理信息
     *
     * @param id 玩法管理ID
     * @return 结果
     */
    @Override
    public int deleteAdminLuckyCommandById(Long id)
    {
        return adminLuckyCommandMapper.deleteAdminLuckyCommandById(id);
    }
}
